package vip.liux.front.adapter.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.liux.application.dots.PagedResultDto;
import vip.liux.front.application.service.product.GoodsDto;
import vip.liux.front.application.service.product.GoodsQueryDto;
import vip.liux.front.application.service.product.GoodsService;

@RestController
@RequestMapping("/api/goods")
public class GoodsController {

    private final GoodsService goodsService;

    public GoodsController(GoodsService goodsService) {
        this.goodsService = goodsService;
    }

    @GetMapping("/list")
    public PagedResultDto<GoodsDto> list(GoodsQueryDto input) {
        return goodsService.list(input);
    }
}
